{% extends "layouts/base.njk" %}

{% from 'macros/cards/hero-card.njk' import heroCard with context %}
{% from 'macros/cards/featured-post-card.njk' import featuredPostCard with context %}
{% from 'macros/cards/featured-docs-card.njk' import featuredDocsCard with context %}
{% from 'macros/cards/featured-tweet-card.njk' import featuredTweetCard with context %}

{% block content %}
  <div class="home-container width-full center-margin pad-400">

    {{ heroCard() }}
    <div class="masonry-grid gap-top-500">
      {% set blog = 'blog-' + locale %}
      {{ featuredPostCard(collections[blog][0]) }}
      {{ featuredDocsCard(featured_projects) }}
      {% include 'partials/report-a-bug.njk' %}
      {% if tweets and tweets.length %}
        {{ featuredTweetCard() }}
      {% endif %}
    </div>

    {#
      Inline a script to cause the elements above to layout in a masonry grid.
    #}
    {% set masonry %}
      {% include 'scripts/masonry.js' %}
    {% endset %}
    <script>{{ masonry | minifyJs | safe }}</script>
  </div>
{% endblock %}